<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let dateUser = new Date('2023-10-5');
    let DateNew = new Date();
    let phase = (dateUser - DateNew) / 1000
    let t = parseInt(phase / 60 / 60 / 24)
    console.log('还有多少天' + t)
  </script>
</body>

</html>